//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.farm.core.auth.impl;

import com.farm.core.AuthorityService;
import com.farm.core.auth.domain.AuthKey;
import com.farm.core.auth.domain.LoginUser;
import com.farm.core.auth.domain.WebMenu;
import com.farm.core.auth.exception.LoginUserNoExistException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.springframework.stereotype.Service;

@Service
public class AuthTestImpl implements AuthorityService {
    public AuthTestImpl() {
    }

    public void loginHandle(String userId) {
        System.out.println("登录成功");
    }

    public Set<String> getUserAuthKeys(String userId) {
        Set<String> map = new HashSet();
        map.add("AUTHKEY");
        return map;
    }

    public LoginUser getUserById(String userId) {
        LoginUser user = new LoginUser() {
            public String getName() {
                return "userName";
            }

            public String getLoginname() {
                return "loginName";
            }

            public String getId() {
                return "userId";
            }
        };
        return user;
    }

    public LoginUser getUserByLoginName(String loginName) {
        LoginUser user = new LoginUser() {
            public String getName() {
                return "userName";
            }

            public String getLoginname() {
                return "loginName";
            }

            public String getId() {
                return "userId";
            }
        };
        return user;
    }

    public List<WebMenu> getUserMenu(String userId) {
        List<WebMenu> list = new ArrayList();
        return list;
    }

    public boolean isLegality(String loginName, String password) throws LoginUserNoExistException {
        return true;
    }

    public AuthKey getAuthKey(String key) {
        return new AuthKey() {
            public boolean isLogin() {
                return false;
            }

            public boolean isCheck() {
                return false;
            }

            public boolean isUseAble() {
                return true;
            }

            public String getTitle() {
                return "权限名称(测试)";
            }
        };
    }

    public List<String> getUserPostKeys(String userId) {
        List<String> list = new ArrayList();
        list.add("POSTID");
        return list;
    }

    public String getUserOrgKey(String userId) {
        return "ORGID";
    }

    public LoginUser getUserByOutUserId(String outuserid, String name, String content) {
        LoginUser user = new LoginUser() {
            public String getName() {
                return "userName";
            }

            public String getLoginname() {
                return "loginName";
            }

            public String getId() {
                return "userId";
            }
        };
        return user;
    }
}
